{template 'common/header'}
{if $op == 'display'}
<form class="form-horizontal" action="" method="post">
    <table class="table we7-table table-hover article-list vertical-middle">
        <tr>
            <td style="width:100px">排序</td>
            <td>公司名称</td>
            <td>公司头像</td>
            <td>入驻到期时间</td>
            <td>详情</td>
            <td>审核状态</td>
            <td class="text-right">操作</td>
        </tr>
        {loop $products $item}
        <tr>
            <td>
                {$item['s_id']}
            </td>
            <td>
                {$item['s_name']}
            </td>  
            <td>
                <img src="{$item['s_thumb']}" width="100px" alt="">
            </td>        
            <td>
                {$item['s_ruzhuendtime']}
                {if $item['s_ruzhuendtime']<=$item['time']}
                <a class="btn btn-default btn-sm"  style="color:red" href="{php echo $this->createWeburl('shop', array('s_id' => $item['s_id'], 'op' => 'savde'))}">入驻已到期[请点击修改状态]</a>
                {/if}
            </td>
            <td>
                <a class="btn btn-default btn-sm"  href="{php echo $this->createWeburl('shop', array('s_id' => $item['s_id'], 'op' => 'post'))}">查看</a>
            </td>
            <td>
                {if $item['s_typs']=='待审核'}
                <a class="btn btn-default btn-sm"  style="color:red" href="{php echo $this->createWeburl('shop', array('s_id' => $item['s_id'], 'op' => 'save'))}">待审核</a>
                {/if}
                {if $item['s_typs']=='审核通过'}
                <a class="btn btn-default btn-sm"  style="color:green">审核通过</a>
                {/if}
            </td>
            <td class="text-right">
                <a class="btn btn-default btn-sm" onclick="return confirm('此操作不可恢复，确认吗？'); return false;" href="{php echo $this->createWeburl('shop', array('s_id' => $item['s_id'], 'op' => 'delete'))}">删除</a>
            </td>
        </tr>
        {/loop}
    </table>
</form>
{$pager}
{/if}
{if $op == "post"}
<form class="form-horizontal" action="" method="post">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">商家详情</h3>
        </div>
        <div class="panel-body">
            <div class="form-group">
                <label for="" class="control-label col-sm-2" style="margin-right:45px">公司名称</label>
                <div class="form-controls col-sm-5">
                    <input type="text"  value="{$item['s_name']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" style="margin-right:45px">公司logo</label>
                <div class="form-controls col-sm-5">
                     <img src="{$item['s_thumb']}" width="100px" alt="">
                </div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" style="margin-right:45px">公司负责人</label>
                <div class="form-controls col-sm-5">
                    <input type="text" value="{$item['s_fuze']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" style="margin-right:45px">公司联系电话</label>
                <div class="form-controls col-sm-5">
                    <input type="text"  value="{$item['s_tel']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" style="margin-right:45px">公司地址</label>
                <div class="form-controls col-sm-5">
                    <input type="text" value="{$item['s_address']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" style="margin-right:45px">公司营业执照</label>
                <div class="form-controls col-sm-5">
                    <img src="{$item['s_yinye']}" width="100px" alt="">
                </div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-2" style="margin-right:45px">公司照片</label>
                <div class="form-controls col-sm-5">
                        {loop $item['s_imgpath'] $img}
                        <img src="{$img}" width="100px" alt="">
                        {/loop}
                </div>
            </div>
</div>
</from>
{/if}
{template 'common/footer'}